Part Number Hot Search : 
SK702 M68719 A332J 1046111 MSS12 XFTPR OM1682 0TA5R
Product Description
Full Text Search
 

To Download STK300 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  page 1 STK300 u ser m anual published by k anda s ystems l td . www.kanda.com
page 2 STK300 user manual copyright ? kanda systems ltd. 1999. all information contained in this publication, including product data, diagrams and charts, represent information on products at the time of publication, and are subject to change by kanda systems ltd. without notice due to product improvements or other reasons. kanda systems ltd. assumes no liability for the accuracy or use of the information. kanda systems ltd. assumes no responsibility for any damage, or infringement of any third-party?s rights, originating in the use of any product data, diagrams, charts or circuit application examples contained in this publication. all copyright and trademarks are recognized and are the property of their owners. no part of this publication may be reproduced or distributed in any form or by any means, or stored in a database or retrieval systems, without the prior written permission of kanda systems ltd., except in the case of brief quotations embodied in critical articles and reviews. ? copyright 1999 kanda systems ltd. all rights reserved. version 1 kanda systems ltd. unit 17/18 glanyrafon enterprise park aberystwyth ceredigion sy23 3jq uk
page 3 introduction welcome to the kanda 300 development kit. this system incorporates an in system programming unit and an applications board. for late breaking news and any manual errata always check the readme.txt file included with the software. device support the system software currently has support for the following devices. avrmega103 avrmega103l avrmega603 avrmega603l upgrades for new devices will be available via the internet from www.kanda.com kanda systems cannot be held responsible for any errors or omissions in this system. the limit of any liabilities is limited to providing replacement hardware or software.
page 4 getting started unpacking the system you will find the following items in the box: main board 1 disk set isp dongle isp ribbon cable system requirements the minimum hardware and software requirements are: 80386 processor or above (486 or above recommended) 1mb ram 1mb free hard disk space windows 95/98/nt
page 5 connecting the system on/off switch power connector rs232 connector programming interface port headers a power supply is required with a standard 2.1mm barrel connector. it can be ac ( 7 - 12 v) or dc ( 9 - 15 v) . the connector is inserted into the power connection socket as shown. the programming lead supplied is fitted into the dongle case and the other end is inserted into the programming interface on the board as shown. the dongle case is connected to one of the printer ports on the pc. if this is not lpt1, then you will need to change the printer port setting in the software - see software section for details. connect lead supplied to dongle and insert in pc printer port or serial port rs 232 connector not used for programming power connector 5.5/2.1 barrel on-off switch plug header on lead into programming interface - key way gives orientation power supply 9 - 15 v dc 7 - 12v ac
page 6 hardware description the main features of the board are shown in the diagram below. note : there are a number of jumpers on the board which are used to select different operations and voltages. the default jumper settings are for programming operations at 5v (jp1 closed) with brownout also set to 5v (jp2 open). to carry out other operations, some jumpers may have to be removed - refer to the relevant section for details. a full list of the jumpers and links are given in the table overleaf. plug in mega board here analog i/p port a digital port b header port c header port d jumpers disable switches port d header misc header for non-port pins 8 switches on port d 8 leds on port b jp2 for brown-out at 3.3v or 5v on-off switch power input 9-15v dc or 7-12v ac isp interface ext. sram address latch ic for ram 4mhz crystal lcd contrast adjustment lcd connector analog reference voltage adjustment port b jumpers disable leds jp1 jumper for 3.3 or 5v vcc select lk1 - cut for a/d external reference power on and program lights selector for rs232 external memory expansion port e header o/p pins for ve supply to op-amp etc.
page 7 jumpers and links and their functions jumper function open closed default jp1 voltage select 5v 3.3v open jp2 brown out select 2.9v 4.5v closed pe0 rs232 rxd port e.0 rxd port e.0 pe1 rs232 txd port e.1 txd port e.1 port b leds leds disabled leds enabled closed port d switches switches disabled switches enabled closed lk1 analogue reference if lk1 cut then external ref from header onboard pot closed cut under board lcd contrast if cut, add extra resistor contrast pot closed external connections all ports are brought out to edge of board on to headers. each header has a vcc and ground pin for power supply to external circuits. port f is the analog input port and is on a header marked analog. there is an extra six-pin header for miscellaneous functions - read, write, ale, reset, ground and vcc. see sections on using external connections and using analog functions for details.
page 8 installing the software windows 95/98/nt to install the software please insert the supplied disk or cdrom in your computer and perform the following steps: click on your start button. select settings. select control panel choose add/remove programs. click the install button. follow on-screen prompts. the software will then be installed onto your computer and an icon will be added to your start menu. note: on some pcs, especially laptops, programming problems may occur if the bios parallel port settings are set to epp version 1.7. if programming problems do happen, ensure that the parallel port settings in your bios are set to epp v1.9 not v1.7. this software does not run on windows 3.xx. note: if you have any problems installing the software or suspect that you have faulty media please contact our technical support department. please make sure you have the latest version of the software installed before contacting the support line. telephone: +44 (0) 1970 621041 fax: +44 (0) 1970 621040 e-mail: support@kanda.com website www.kanda.com
page 9 how to use the software the programmer software is shown below: overview the programmer uses three main displays: flash memory eeprom memory status data and information is displayed on three screens. you can access each screen with a click on the relevant button or via the view menu. the main menu details file and programmer operations and the configuration information is shown just below the menu bar. a status indicator at the bottom of the screen shows whether an operation was successful. a red light indicates an error has occurred. status indictor and message line red = error yellow = in progress green = ok memory buffer window - editable ascii pane - editable window selection main menu device selection security settings hardware selection
page 10 configuring the software 1. the first step is to choose the type of hardware connection, using the drop-down list at the top right of the screen. select e-isp serial port or e-isp parallel port as required. ensure that the board is connected to the serial or parallel port as appropriate. 2. select the required device in the device drop-down. the memory sizes, fuse availability and other device specific features are set automatically to fit the selected device. 3. select the programmer - options menu choice. tab type of port description port selection parallel select from lpt1, lpt2, and lpt3 serial com 1, com 2, com3 and com 4 advanced options parallel maximum read and write timeout settings with a default of 180000 and minimum baud rate. serial maximum read and write timeout settings with a default of 100000. note : if you have time out errors when using the programmer you should try and increase the time outs. voltage serial and parallel sets the operating voltage. select the required level of vcc (vdd). most programming operations are at 5v even if the voltage is set differently. check the atmel datasheets for voltages that can be used on the ports. note : some low voltage parts need 5v for programming. the selected voltage is applied as soon as the dialog is closed. it will change to 5v as soon as programming operations takes place. selecting device , run will re- apply the operating voltage selected. 4. select the level of programming security required from the security drop-down menu. note : some tiny avr devices, especially early versions, can lock out after the security lock bits are set. apply the lock bits after the code has been developed. loading data 1. select file - load . a sub- menu enables you to select flash or eeprom memory as the target for the load operation. note : only intel hex files can be used. 2. select the appropriate file. status light description red error during the load operation, because: the file can not be found the file is not intel hex, the file is too big or any other error error message displayed. click on error message to view status window. green operation successful
page 11 yellow operation is taking place this light coding applies for all operations. 3. when a file has been loaded into the flash memory and the eeprom memory if required, the programmer is ready for programming operations. eeprom data (or flash data) can be typed directly into the buffer windows instead of being loaded from a file. the data can be entered as ascii characters or as hexadecimal numbers. programming the programming operations are listed in the device menu. the programmer must be configured before programming can be undertaken, and for the program function, data must be loaded into the buffer windows the options listed in the device menu are: option description erase the device is erased and code and eeprom memories will be empty - blank value is ffh. all fuse settings will be cleared to default values (see data book/cd-rom for device specific fuse information). program choose flash, eeprom, lock bits or fuses on the fly-out menu. if flash or eeprom is chosen, then that part of the device is programmed with the contents of the flash or eeprom buffer window respectively. if lock bits are selected, the security bits are programmed according to the security settings drop-down list described above. if fuses are chosen, a dialog box appears with the fuses available on the selected device. set the fuses to your requirements. read if flash or eeprom are selected, the contents of the device memory selected is uploaded and displayed in the relevant buffer window. if the device is blank, then all locations will read as ffh. if the security (lock) bits are set, then the data will be invalid. selecting fuses displays the status of the fuses on the selected device in a list box. verify the contents of the selected memory area (flash or eeprom) on the device is compared with the contents of the equivalent buffer window and any differences are shown in red - correct values are shown in green. fuses only available with some devices. used for such functions as clock selection, etc. you can read or write to the fuses of the selected device. run converts the board operation to run mode. the operating voltage selected earlier comes into effect. auto program will run all, or a selection of the above options. select auto-program options to set the required programming operations. a list of operations is displayed:
page 12 check the required functions. all the selected functions will run when auto-program (f5) is used. if program fuses is available and checked, then another dialog box will appear after this list is closed where you can set device specific fuses. note : erase the device before programming unless you are adding extra data to existing data in the device. if you are changing data then you cannot change any programmed bit from a 0 to a 1 without erasing the device first. you can however, change a bit from a 1 to a 0. so bb could be changed to aa for example but aa cannot be changed to bb. you will not be able to program the device if the write lockbit has been set. warning: setting lockbits may mean that you will be unable to perform further verification on the device, and disable further writing to the device, you will be able to re-use the device if you perform an erase.
page 13 menu and option descriptions file menu load select memory area/buffer window to load (flash or eeprom), then open the intel hex file in the open file dialog box. a red status warning light indicates that the file load was unsuccessful. this may be because the file is not intel hex or it is too large for the selected buffer/memory. save saves the contents of the buffer selected (flash or eeprom) to file. choose a filename in the file save dialog box that appears. reload reloads the buffer (flash or eeprom) with the last file opened. exit quits the program. standard windows close choices can also be used to exit the program. device menu erase the whole device is erased. program the selected device memory, fuses or lock bits are programmed read the selected device memory or fuses are read verify the selected device memory is verified against the buffer contents fuses this is available if the software and device support this function run runs the program downloaded to the device on the board. auto program all operations selected in the auto program options are carried out auto program options dialog box to set required programming operations that will be carried out sequentially when auto program is pressed. programmer menu options dialog box for port selection, read/write timeouts and voltages (1.8 - 5v). you must choose parallel or serial port operation and the correct device first. note : most parts program at 5v even if they are low voltages for operation. information shows information about the programmer state e.g. hardware detected, which port etc. view menu flash the flash memory buffer window is displayed. eeprom the eeprom memory buffer window is displayed. status the status window is displayed. this lists all operations, error messages, and status information that have been posted during this session. see also window selection on the next page. help menu readme displays the latest information on the software and devices in the status window. about version and program information
page 14 other controls device selector located at the top left of the screen, this drop-down list is used to select the required device. make sure that this selection matches the device you have plugged into the board. obtain an upgrade to support new devices as they are released. security located in the center of the screen, security is used to select type of access to the device once it has been programmed. this is done by programming the lock bits, so ensure that the lock bits are checked in the device, auto program options if you want security set on the device, or select device, program, security lock bits for manual programming. hardware selection located at the top right of the screen, the hardware selection must be set to either serial or parallel port. which serial or parallel port is used is set in the programmer, options menu. ensure that the board is connected to the correct port. window selection located below the device field, these three buttons indicate which display is visible. flash buffer window eeprom buffer window status window see below for details. which display is active can also be selected using the view menu. see previous page. flash memory displays the flash memory in a buffer window. the code to be programmed into the device is loaded into this buffer by the file, load, flash option, or read from the device by the device, read, flash option. the size of the buffer changes to mirror the flash memory size on the selected device. if device, verify, flash is used, the contents of this buffer are compared with the contents of the flash (code) memory on the device. locations which match are shown in green, mis-matches are shown in red. the data in this buffer window can be changed or entered as either hexadecimal numbers or ascii characters. holding the mouse cursor over a value brings up a fly-out, which gives the address and the value in decimal, binary, hexadecimal and ascii. eeprom buffer displays the eeprom memory in a buffer window. the code to be programmed into the device is loaded into this buffer by the file, load, eeprom option, or read from the device by the device - read - eeprom option. the size of the buffer changes to mirror the eeprom memory size on the selected device. if device, verify, eeprom is used, the contents of this buffer are compared with the contents of the eeprom memory on the device. locations which matches are shown in green, mis-matches are shown in red. the data in this buffer window can be changed or entered as either hexadecimal numbers or ascii characters. holding the mouse cursor over a value brings up a fly-out, which gives the address and the value in decimal, binary, hexadecimal and ascii.
page 15 status this window lists all the operations, status and error messages that have occurred during the current session. to clear the messages displayed, right-click and select clear status . status indicator displays a visual result of the current operation - red means that the operation failed, yellow means it is in progress and green means it was successful. further information is given in the accompanying message. these messages are listed in the status window .
page 16 programming using the board device orientation before programming a device using the programming module, the device adapter must be inserted correctly into the programming unit. the adapter itself has a corner cut off, which locates pin 1 of the device and matches the marking on the main unit. this adapter should be pre-fitted, but can be replaced if the device programming life is exceeded - refer to your supplier to obtain new device adapter. the orientation of the device is vitally important. if you put it in the wrong way then you may damage the device. do not plug a device adapter in with the power switched on or you may damage it. similarly never remove the device adapter with the power on. voltage selection jumper jp1 is used to select either 3.3v or 5v programming. for vcc = 5v remove jumper jp1 - jumper open for vcc = 3.3v insert jp1 - jumper closed jumper jp2 is used to set brown-out detector voltage. for brown out = 5v insert jumper jp2 - jumper closed for brown out = 3.3v remove jumper jp2 - jumper open this should be set to the same voltage as vcc. if vcc is set to 3.3v and brown-out is set to 5v, then the device will be held in reset and will not program. see section on brown-out detector for more details. jp1 jp2 power and lead connections the 10 way programming lead is inserted in the box header - the key-way ensures correct orientation. the computer connections are shown in the section on connecting the system. the power supply (9-15v dc or 7-12v ac) is plugged into the power connector (5.5/2.1 barrel). the power on/off switch is located next to the power connector. insert the device adapter before switching the power on. the power on led should light when the power is correctly applied. your hardware is now ready for programming. refer to using the software description for details of programming operations. a programming led indicates programming is happening.
page 17 brown out detector the brown out detector circuit is used to detect voltage drops. if a short glitch occurs in the power, this circuit ensures that the processor resets properly rather than operating randomly. the brown out detector must be set to the same voltage as the circuit voltage (vcc) - 3.3v or 5v. for 3.3v operation, jumper jp2 must be removed (jumper open) and for 5v operation it must be closed. voltage operating voltage hysterisis 5 volts 4.5 volts 200 mv 3.3 volts 2.9 volts 200 mv these values are approximate and may vary with temperature and other factors.
page 18 board applications using switches and leds the leds are connected through a 1k resistor network to port b. the switches are connected to port d. the switches and leds can be disconnected if required, so to use them, ensure that the jumpers labeled port b and port d are closed. the board is also marked with the port pin connection for each switch and led. the ports must be correctly set in software as input or output. this is accomplished by setting the direction control registers to 0 for input and 1 for output. typical set up code would be : mov r16, $ff ; move literal into temporary store register out ddrb, r16 ; set direction register to ones for output - leds out portb, r16 ; switch all the leds on mov r16, $00 ; move literal into temporary store register out ddrd, r16 ; set direction register to zeros for input - switches using external connections all the ports are brought out to headers on the edge of the board. in addition to the port pins, each header has a connection for ground and vcc to supply external circuits. note this voltage (vcc) will be either 3.3v or 5v depending on the setting of jumper 1 (jp1) and the brown out detector will operate. note : if your circuit is to draw significant current ( >250 ma) then a heat sink will be required on the on-board regulator - lm317. this device is rated at 1.5 amps but it does need a heat sink to supply this current. if your circuit will draw more than 1 amp, you may need a separate power supply. the ports on the device are connected to the headers marked port a, port b, port c, port d, port e and analog (port f). the layout of all the headers is the same and is shown in the diagram. bit 1 bit 3 bit 5 bit 7 vcc bit 0 bit 2 bit 4 bit 6 gnd misc header bit 0 of port. same for all ports. cut corner shown on board for orientation bit 7 of port. same for all ports extra connection for vcc extra connection for ground
page 19 the last header labeled misc has connections to processor pins other than the port pins. ale external reset vcc read rd gnd write wr if external operations do not want pull-ups on the port pin, both the switches and the leds can be disconnected from the processor. to isolate the leds, remove the jumper set labeled port b, and to isolate the switches, remove the jumper set labeled port d. using analog functions the a2d converters use the header labeled analog for the a/d inputs on port f, which is input only. a +10v to -10v supply is provided on the connector marked op-amp next to the crystal. a lead from this connector can be used for an external amplifier for the adc inputs. the layout of the analog header is shown below. analog port : marked on board adc1 adc3 adc5 adc7 analog ref adc0 adc2 adc4 adc6 analog gnd the a/d converters can use either the on-board (internal) voltage reference or an external voltage reference. cut out marked on board to give orientation extra connection for vcc extra connection for ground cut out marked on board to give orientation adc0 - adc7 connected to port f pf0 - pf7
page 20 using internal reference to use the internal (on-board) voltage reference, the pot marked aref is used to set the voltage level. the voltage level can be measured with a meter connected to the header pins labeled analog ref and analog gnd in the above diagram or from the two holes marked meter (+ and -). using external reference to use the a2d converters with an external voltage reference, the link marked lk1 must be cut. the voltage is applied to the pins marked analog ref and analog gnd on the analog header - see diagram above. dual rail power supply an dual rail power supply is included - marked op-amp. it is design to provide a low current (<2ma) supply for external operational amplifiers for signal conditioning etc. on the adc inputs. it is designed to supply +10v and -10v, but this may vary especially if the rs232 is being used. using real time clock a 32768 hz crystal is connected to tosc1 and tosc2 pins - pin 19 and pin 18. this can be used to generate a 1 second pulse by setting timer 0 to asynchronous operation - see data book for details. using external ram the at90meg103 can be used with external sram. a socket is provided for a 28 pin ram chip and for an address latch chip. these are next to the device adapter at the top of the board. there is also a header for further memory expansion, which is connected through the address latch. the pin functions are marked on the board, including chip select (cs). ram recommendations a low power 62256 sram is suggested with an access time of 70 ns. if a very fast ram is required, the crystal frequency may need to be increased. if a much slower sram is used, the sram wait state bit must be enabled in user software (see data book). the layout of the 28 pin ram socket is shown below, and any ram with this pin-out could be used. the ram is memory mapped to $8000..$ffff.
page 21 ram socket pin layout 1 2 3 4 5 6 7 8 9 10 11 12 13 14 a14 a12 a7 a6 a5 a4 a3 a2 a1 a0 i/o0 i/o1 i/o2 vss vcc we a13 a8 a9 a11 oe a10 cs i/o7 i/o6 i/o5 i/o4 i/o3 28 27 26 21 25 24 23 22 20 19 18 17 16 15 address latch . the board connections are for a 74hc573 device. this device will operate reliably with the 4 mhz crystal supplied but if a faster crystal is inserted, a faster version of this device may be required - 74ahc573 or 74fhc573. note that this option will alter the emc characteristics of the board and the ce mark will no longer be valid without re-testing. using expansion header the expansion header (marked memory expansion) can be used for memory mapped peripherals. the chip select (cs) line is connected which gives compatibility with most popular microcontroller peripheral devices e.g. memory, pias, timers etc.. the header is mapped from $0000 to $ffff, but internal memory will take precedence. the address latch chip (74hc573) must be inserted before the expansion header can be used, but the ram chip can be omitted.
page 22 using lcd connections the header marked lcd interface is for a standard 2 x 16 lcd. the connections are shown on the board and in the following table. connection name function 0v ground 0v +5 vcc - must be 5v vo contrast rs register select- a14 wr not write e enable d0 data bit 0 d1 data bit 1 d2 data bit 2 d3 data bit 3 d4 data bit 4 d5 data bit 5 d6 data bit 6 d7 data bit 7 the board is designed for use with an lcd with a hitachi driver chip built-in, with a contrast pin voltage of 0 to 5 volts. the pot next to the lcd connector is used for contrast adjustment. if you use a different lcd driver, it may have a different voltage contrast range. in order to accommodate this, add a resistor to the board (shown above) and cut track on underside of board - marked cut. this board is not designed for use with back lit lcd modules, so the extra connections needed are not included and the power supply will not supply the current required. the lcd must be driven in memory mapped mode as read and write are descite pins on the mega parts- see data sheet. if the crystal has been changed to a faster crystal frequency, memory mapped operations will not work. using rs232 the connection supplied is a 9-way female d-type, so a ?straight through? lead is required - not a null-modem cable. the jumpers in the middle of the board, marked pe0 and pe1 must be set to rs232 not port or rxd and txd will be disabled. as this board has a 4 mhz crystal, the percentage error on the baud rate will be between 0.2 and 7.8%. replacing the crystal with a 3.6846 mhz or 4.608 mhz crystal will reduce this error to zero but may have emc implications. a standard (straight through) lead is required not a null-modem cable.
page 23 programming in system devices can be programmed in your circuit rather than on the board. for in system programming, (isp), the 10 way programming lead is connected to a dual row 10 way (0.1" pitch) header on your circuit. you will need to use either a multiplexer chip (such as a 4053) or wire directly to the pins of the device. without a multiplexer chip, serial communications and spi port will be unusable: in addition the system +5 volts and ground need to be connected to the programming lead. do not exceed 5 volts (4.75 to 5.25 volts is allowed) or you may damage your computer. this warning applies to any isp system. beware !!! isp header layout ground vcc mosi -pdi led rst sck miso -pd0 470r 10 9 1 2 optional program indicator circuit key way
page 24 interface using resistors programming header miso mosi sck pb1 pe1 pe0 rst sck-pb1 pdo-pe1 pdi-pe0 reset avr typical resistor values would be 1k. this circuit is fine if ports pb7, pe0 and pe1 are used as inputs in your circuit and no communications are required. if outputs are needed or rs2232 connections, especially higher than a few milliamps, then the multiplexed circuit is preferable. using an analogue multiplexer ic pb1 pe1 pe0 reset avr axy bxy cxy a b c inh ax bx cx ay by cy 74hc4053 sck miso mosi pb1 pe1 pe0 rst 0v to isp connector to user circuit user circuit miso is called pdo and mosi is pdi on mega devices - port e bits 0 and 1 not pins on port b.
page 25 the multiplexer select can be driven from the led connection on the programming lead (as can a low power led with its cathode connected to the led connection via a suitable resistor -1k5 is fine-). if you use this connection then the output will be low (0) during programming and a 1 at all other times. note that it will float if the programmer is not active (i.e. the software is not running) so you may need to use a pull up resistor. note that all the pins (except ground) will float if the programmer is not active. the device may then be programmed in the normal way
page 26 application builder this image indicates which icon to select, i.e. the one on the left. alternatively, use the file menu and select application builder. start w indow the first step is to select the device you want to use from the list on the top left, labelled devices . watchdog timer application builder speed button
page 27 the on-board watchdog timer (wdt) can be enabled or disabled. if it is enabled a prescaler can be applied to lengthen the wdt time-out period. the minimum time-out period is 16 ms and the maximum is 2048 ms. if emulation is required it is recommended that the wdt is disabled. sram external sram can be used with some avr devices - see device data sheets for details. the external sram enable bit must be set (sre bit in mcucr register). some operations e.g. memory mapped lcd driving require a longer clock pulse. this can be achieved by inserting a wait state. stack pointer this sets the position in memory at which the stack will start, in hexadecimal. the default value given is the top of internal sram in the device selected, as the stack grows downwards in avr devices. change this value if you require the stack elsewhere in internal or external sram. by default, if the box is clear, this value is set to be zero. note : at90s1200 devices have a hardware stack so this option is disabled if this device is selected. external sram and sram wait state are enabled with the two check boxes on the left-hand side. these options enable external sram access and slow the read/write pulses if required. output type the type of code output can be selected. there is a choice of assembler output or c code. there are some differences between iar and atmel assemblers - include file paths etc. so select the correct assembly language output type. next button this button will move you to the next page selected in the peripherals list. if no peripherals are selected, a minimal template is generated. note: if at any time you press a back button to get to this screen, the device select list will be disabled i.e. you can not change device once you leave this screen.
page 28 peripherals window peripherals the various peripherals are enabled or disabled depending on which device is selected, so this list acts as a map of the peripherals available on each device. each peripheral has a separate page in the application builder. ports the ports required are selected in this section. note that port c is output only and port f is input only port a, port b, port d and port e are standard input/output. elpm this choice selects whether the elmp (extended load program memory) instruction is set to the bottom 64k or the top 64k of program memory. this choice is disabled in devices with 64k or less of program memory.
page 29 sleep and power down window xtal the oscillator frequency can be divided by a factor between 1 and 129 to reduce power consumption when processing power requirements are low. set the divide factor required in the spin box. checking the xtal divide box will enable xtal divide immediately, but in most applications this will not be required, so leave the box unchecked and set the xtalen bit in the xdiv register when needed (xdiv.7). sleep mode there are three sleep modes, which can be preset in this option. when sleep mode is required, set the sleep enable bit (se) just before executing the sleep instruction (to avoid unwanted sleep mode). the se bit is bit 7 of the mcucr register (mcucr.7). reset source checking it is possible to check which reset source caused a mcu reset but this must be setup first. checking this box inserts the correct code for doing this.
page 30 timer 0 window timer 0 is an 8-bit timer/counter. asynchronous operation this timer can be asynchronously clocked from an external oscillator connected to tosc1 and tosc2 pins (pins 19 and 18). it is optimized for a 32.768 khz crystal for use as a real time clock, and this crystal is fitted on the STK300 board. timer 0 can also operate in pwm mode or output compare mode or neither. pwm enable becomes enabled when output compare is clear and vice-versa. pwm enable this enables pulse width modulation mode for this timer. the resolution is set to 8-bit. so the timer counts from $00 to $ff and down to $00. the match value is set in the compare value field. when the timer value matches the value set in the compare value field (which will occur twice every cycle - on upcount and downcount), the output action that results on pwm0 (pin 14)) can be set by the output action radio buttons : disconnected - no effect on output pin
page 31 non-inverted - cleared on upcount, set on downcount inverted - set on upcount, cleared on downcount output compare the value of timer 0 is compared with the value set in the compare value field. when a match is detected, the effect on the output pin (oc0 - pin 14) is set by the output radio buttons. if the clear timer box is checked, the timer is reset to $00 in the cpu clock cycle after a match. the output can be configured as illustrated. timer 1 window timer 1 is 16-bit and is far more complicated than timer 0 and has many more operating modes. standard operation regardless of which other options are selected, timer 1 can operate in timer or counter mode if source is set to timer, timer 1 increments from the system clock. if it is set to counter, it increments on either rising or falling edge (set by edge ) on t1 pin (pin31 - pd6). a prescaler can be applied to increase overflow time in timer mode.
page 32 input capture this option is also always available. when the edge selected (rising or falling edge) is detected on icp pin, the current value of timer 1 is copied to the input capture register - icr1. the input capture flag is also set and an interrupt can be generated - timer 1 capture. the other two options are pwm mode and output compare mode and these are mutually exclusive. when output compare is selected, pwm mode becomes disabled, and vice-versa. both of these options can use a counter or timer source and can operate with or without input capture. pwm mode this option makes timer 1 and the output compare registers (ocr1a and ocr1b) act as a pulse width modulator. the resolution of the output can be 8, 9 or 10-bit depending on the choice selected in the resolution box. the timer counts from $0000 to top value and back to zero. top value is either $ff, $1ff or $3ff depending on the resolution (8, 9 or 10-bit). the default value is top, but this value will give either a constant low or a constant high level on the output pins depending on the settings of outa and outb. therefore you must enter a value in matcha and matchb which is less than top in order to get the modulation on oc1a and oc1b pins respectively. so, in pwm mode, timer 1 counts from $0000 to top and down again. this means that there will be two compare values for ocr1a and ocr1b every cycle - going up and then down - when the match values correspond to timer 1 value. outa and outb set the output options when these matches occur: disconnected - no effect on output pins non-inverted - cleared on upcount, set on downcount inverted - set on upcount, cleared on downcount output compare the other option with timer 1 is output compare mode. unlike pwm mode, all 16 bits of the output compare registers ocr1al/h and ocr1bl/h are used. these values are set in the comparea value and compareb value fields. whenever the value of timer 1 matches these values, the effect on the output pins (oc1a, oc1b) is specified by the outputa and outputb radio buttons. clear timer clears timer/counter1 to $0000 in the clock cycle after a comparea match. if this is not checked, timer/counter1 will continue to count, unless cleared elsewhere. .
page 33 timer 2 window timer 2 is an 8-bit timer/counter. standard operation
page 34 regardless of which other options are selected, timer 2 can operate in timer or counter mode if source is set to timer, timer 2 increments from the system clock. if it is set to counter, it increments on either rising or falling edge (set by edge ) on t2 pin (pin32 - pd7). a prescaler can be applied to increase overflow time in timer mode. pwm enable this enables pulse width modulation mode for this timer. the resolution is set to 8-bit. so the timer counts from $00 to $ff and down to $00. the match value is set in the compare value field. when the timer value matches the value set in the compare value field (which will occur twice every cycle - on upcount and downcount), the output action that results on pwm2 (pin 17 - pb7)) can be set by the output action radio buttons : disconnected - no effect on output pin non-inverted - cleared on upcount, set on downcount inverted - set on upcount, cleared on downcount output compare the value of timer 0 is compared with the value set in the compare value field. when a match is detected, the effect on the output pin (oc2 - pin 17 - pb7) is set by the output radio buttons. if the clear timer box is checked, the timer is reset to $00 in the cpu clock cycle after a match. the output can be configured as illustrated.
page 35 external interrupts window the avrmega has 23 interrupt sources, including 8 external interrupts (int0..int7). if this page or the next page (interrupts) are selected, an interrupt template will be generated even if no actual interrupts are checked. interrupts int0 to int3 are always low leveled triggered on pin 25 to pin 28 (pd0..pd3). to select an interrupt, check its box. interrupts int4 to int7 are triggered by changes on the interrupt pins (pin 6 to pin 9 - pe4..pe7). the type of change that causes an interrupt can be set with the appropriate set of radio buttons. these buttons are only enabled when the corresponding interrupt is checked.
page 36 interrupts window to enable an interrupt, check the corresponding checkbox- note that the external interrupts are on a separate page. an interrupt template is generated even if no individual interrupts are checked. the comparator section is enabled if the analogue comparator interrupt is checked. the comparator can be disabled, and the cause of the interrupt can be selected. the comparator output can be connected to the input capture mechanism on timer 1 and therefore generate an interrupt on timer 1 capture, by checking the input capture enable box.
page 37 uart and spi port window uart the use uart checkbox can be cleared if spi is required and uart is not needed. crystal frequency is a drop down box containing the frequency of the crystal currently on your circuit. the baud rate is that of the com port being used to communicate with the device. assistance with this can be found within your operating system?s documentation. the application builder software calculates the required value to generate the selected baud rate at the chosen crystal frequency. the options section enables the transmitter and receiver. the 9-bit characters box adds an extra character that can be used for parity or extra stop bit purposes. spi the spi enable section contains an enabling checkbox. if data order is checked then data is sent msb first, otherwise data is sent lsb first. clock polarity sets whether the sck line is high when idle (box is checked) or low when idle (clear). clock phase selects whether the data is read on the start of a clock cycle (checked) or halfway through a clock cycle (clear). see atmel data book for more explanation. master/slave select selects whether the spi is to be configured as a master (checked) or slave (clear). the clock rate drop down box becomes enabled when master is selected and gives prescaler options for sck.
page 38 analog to digital converter window adc enable starts the adc. please read the atmel data book for information on the dummy conversion needed. adc free run makes the adc constantly convert, continuously updating the adc data register. if this box is not checked, the adc operates in single conversion mode and the adsc bit (adcsr.6) must be set every time a conversion is required..
page 39 adc prescaler slows the converter?s input clock down when dealing with xtal frequencies above 100khz. the maximum clock frequency for the adc is 200khz (50khz to 200khz) so the main oscillator must be prescaled appropriately. adc channels used selects which input lines (ad7..ad0)are to be used in multiplexed adc operations. any pins not used can be used for standard digital inputs - port f.
page 40 standard ports windows this page is representative of the set-up values for the different standard i/o ports (a, b, d and e). the left-hand column controls whether the port data line is an input (checked) or an output (clear). the second column controls whether the internal pull-up is enabled (checked) or disabled (clear) - inputs only. the third column is greyed until the line is selected as an output. the boxes then control the initial output value, be it 1 (checked) or 0 (cleared). note : if a pin has already been allocated to its second function e.g. counter input, interrupt pin, uart txd, rxd etc. then it is disabled and cannot be reset.
page 41 port c window port c is output only, so the only choice is initial output value. if external sram is enabled, then this port is used for the upper byte of the address and is therefore disabled.
page 42 port f window port f is input only. any bits not used by the adc can be used for standard input.
page 43 technical support about kanda systems we, at kanda systems, design and manufacture all of our own products in the principality of wales. we can also undertake custom design work with both software (high and low level) and hardware designs. please contact us if you would like help with any projects. kanda systems ltd are a leading supplier of semiconductor tools and development products. kanda systems can help you realise your digital designs by providing everything from software to hardware solutions. we can offer professional support in the following areas: development tools - device starter kits, in-circuit emulators and programmers training - logic trainer, adc trainer, switched mode psu designer, technical books and training seminars & courses. instrumentation & software - iar c compilers for most popular microcontrollers, low cost - high performance pc based logic analysers and logical devices full cupl software with schematic capture. support services  high volume device programming & design consultancy. contacting kanda we would be grateful if you can pass on any errors you may find in this software. we pride ourselves on our customer support and we can usually solve the problem and send you an update very quickly (especially if you have email). similarly if you have any technical support questions then please contact us. we can be contacted at: kanda-systems limited unit 17 glanyrafon enterprise park aberystwyth, sy23 2jq uk tel: +44 (0) 1970 621041 technical support +44 (0) 1974 621030 general enquiries fax: +44 (0) 1970 621040 e-mail: sales@kanda-systems.com helpdesk@kanda-systems.com we also have an extensive range of development products available, please contact us or see our website (http://www.kanda-systems.com) for full details, prices etc. software upgrades and free demos are also available on our website.
page 44 emc regulations this system has been tested to ensure that it complies with the latest regulations for emc susceptibility and emissions. it has been passed for conductivity and radiation and conforms to the regulations in all respects. however, neither kanda systems or atmel can be held accountable for any user supplied equipment, such as power supplies and computers, used with this system. if these parts do not conform to the emc regulations, then the complete system will not conform to standards. the same proviso applies to any user circuitry connected to this system, such as test boards and modules. if any changes are made to the hardware supplied with this system, such as a change in the crystal frequency or modifications to tracks or layouts then the system will not conform to the regulations. with these factors in mind, users should not use this system in areas where a life threatening situation could occur as a result of emc emissions, for example operating theatres. users of this system with pacemakers or other medical equipment should consult their medical adviser before using the system, and if any doubt remains, should retest the complete system, including ancillary equipment such as computers and power supplies to ensure that the emc regulations are still being met.
page 45


▲Up To Search▲   

 
Price & Availability of STK300

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X